<?php

namespace app\api\controller;

use fast\Random;
use think\App;
use think\facade\Validate;
use think\facade\Config;
use app\common\library\Ems;
use app\common\library\Sms;
use app\common\controller\Api;
use think\Request;


class Team extends Api
{
    protected $noNeedLogin = [];
    protected $noNeedRight = '*';

    protected $model = null;

    /**
     * 构造方法
     * @access public
     * @param Request $request Request 对象
     */
    public function __construct(Request $request = null)
    {
        parent::__construct(App::getInstance());
        $this->model = new \app\api\model\Team();
    }

    public function _initialize()
    {
        parent::_initialize();
        if (!Config::get('fastadmin.usercenter')) {
            $this->error(__('User center already closed'));
        }
    }

    public function getList(){
        $user = $this->auth->getUserinfo();
        $data  = $this->model->getList($user);
        $this->getReturnData($data);
    }



    public function getIncome(){
        $user = $this->auth->getUserinfo();
        $data  = $this->model->getIncome($user);
        $this->getReturnData($data);
    }








}
